package Mateusz_Flieger;


import java.util.Scanner;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Nozdi
 */
public class Prostokat {
        private double x;
	private double y;
        
        Prostokat(double a, double b){
            a=this.x;
            b=this.y;
        }
        Prostokat(Prostokat a){
            x=a.x;
            y=a.y;
        }
	
	void ustal_wartosc() {
		System.out.println("Podaj nasze x, y");
		Scanner sc = new Scanner(System.in);
	     x = (sc.nextDouble());
	     y = (sc.nextDouble());
	}
        double pole(Prostokat a){
            return a.x*a.y;
        }
	double dlugosc_przekatnej(Prostokat a){
            return Math.sqrt((a.x*a.x)+(a.y*a.y));
        }
}
